﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title><{config_item('manager_title')}></title>
    <script language="javascript" src="/public/js/jquery.js"></script>
    <script language="JavaScript" src="/public/express_templet/editorjs/Canvas.1.0.1.js"></script>
    <script language="javascript" src="/public/express_templet/editorjs/Print.js"></script>
    <script language="JavaScript" src="/public/express_templet/editorjs/elementNode.js"></script>
    <script language="javascript" src="/public/express_templet/jquery.PrintArea.js"></script>
    <style>
        * { /* Basic CSS reset*/
            margin: 0;
            padding: 0;
        }

        body { /* These styles have nothing to do with the sucaihuo*/
            background: url(/public/express_templet/images/dark_wood.png) 0 0 repeat;
            padding: 0px 0 0;
            margin: auto;
            text-align: center;
        }

        .sucaihuo {
            display: inline-block;
        }

        .sucaihuo:after, .sucaihuo:before {
            margin-top: 0.5em;
            content: "";
            float: left;
            border: 1.5em solid #fff;
        }

        .sucaihuo:after {
            border-right-color: transparent;
        }

        .sucaihuo:before {
            border-left-color: transparent;
        }

        .sucaihuo a:link, .sucaihuo a:visited {
            color: #000;
            text-decoration: none;
            float: left;
            height: 3.5em;
            overflow: hidden;
        }

        .sucaihuo span {
            background: #fff;
            display: inline-block;
            line-height: 3em;
            padding: 0 1em;
            margin-top: 0.5em;
            position: relative;
            -webkit-transition: background-color 0.2s, margin-top 0.2s; /* Saf3.2+, Chrome*/
            -moz-transition: background-color 0.2s, margin-top 0.2s; /* FF4+*/
            -ms-transition: background-color 0.2s, margin-top 0.2s; /* IE10*/
            -o-transition: background-color 0.2s, margin-top 0.2s; /* Opera 10.5+*/
            transition: background-color 0.2s, margin-top 0.2s;
        }

        .sucaihuo a:hover span {
            background: #FFD204;
            margin-top: 0;
        }

        .sucaihuo span:before {
            content: "";
            position: absolute;
            top: 3em;
            left: 0;
            border-right: 0.5em solid #9B8651;
            border-bottom: 0.5em solid #fff;
        }

        .sucaihuo span:after {
            content: "";
            position: absolute;
            top: 3em;
            right: 0;
            border-left: 0.5em solid #9B8651;
            border-bottom: 0.5em solid #fff;
        }

        .content {
        }
    </style>
    <style media="print">
        .noprint {
            display: none
        }

        .nextpage {
            page-break-after: always;
        }
    </style>
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="/public/express_templet/html5shiv.min.js"></script>
    <script src="/public/express_templet/respond.min.js"></script>
    <![endif]-->
</head>
<body style="align:center">
<div class='sucaihuo'>
    <a href="#" onclick="a()"><span>打印</span></a>
</div>
<div id="con" class="content">.
    <p class="nextpage">这里显示第一页.</p>
    <div style="page-break-after: always;"></div>
    <p>我是需要打印的内容。但是不想打印出按钮</p>
</div>
</BODY>
<script language="JavaScript">
    function a() {
        $("div#con").printArea();
    }
    function addpage() {
        var content = document.getElementById('con');
        var p = document.createElement('div');
        p.setAttribute("class", "nextpage");
        content.appendChild(p);
    }
    <{foreach $list as $val=>$key}>
    <{if $val>0}>addpage();<{/if}>
    <{if $val==0}>var print = <{/if}>new Print({
        id: "con",
        jdatasource: {
            "ok": true,
            "买家信息": [{
                "姓名": "<{$key.full_name}>",
                "电话": "<{$key.tel}>",
                "收货地址": "<{$key.area_name[$key.prov]}><{$key.area_name[$key.city]}><{$key.area_name[$key.area]}><{$key.address}>",
                "送货时间": "<{$key.delivery_time}>",
                "城市": "<{$key.area_name[$key.city]}>"
            }],
            "卖家信息": [{
                "联系人": "<{$key.shop_address.full_name}>",
                "电话": "<{$key.shop_address.tel}>",
                "联系地址": "<{$key.shop_address.area_name[$key.shop_address.prov]}><{$key.shop_address.area_name[$key.shop_address.city]}><{$key.shop_address.area_name[$key.shop_address.area]}><{$key.shop_address.address}>",
                "城市": "<{$key.shop_address.area_name[$key.shop_address.city]}>",
            }],
            "订单明细": [{
                "订单号": "订单号:<{$key.order_no}>",
                "订单价格": "价格:￥<{$key.order_price}>"
            }],
        },
        template: <{$express_data.config}>
    });
    <{/foreach}>
</script>
</body>
</html>